<template>
  <van-nav-bar title="首页" fixed/>
  <div style="margin-top: 40px;"></div>
  <!-- 搜索 -->
  <search></search>
  <!-- 轮播 -->
  <lun></lun>
  <!-- 宫格 -->
  <van-grid :column-num="4">
    <van-grid-item
      v-for="item in daoData"
      :key="value"
      :icon="item.image_src"
      :text="item.name"
    />
  </van-grid>
  <!-- 楼层 -->
   <div v-for="item in floorData">
    <img :src="item.floor_title.image_src" alt="" style="width: 100%;">
    <div v-for="items in item.product_list" style="float: left;margin: 2px;">
        <img :src="items.image_src" alt="" style="width: 120px;height: 120px;">
    </div>
   </div>
</template>

<script setup>
import { ref } from "vue";
import search from "@/components/search.vue";
import lun from "@/components/lun.vue";
import { daoApi } from "@/api/api";
let daoData = ref([]);
daoApi().then((res) => {
  console.log("导航数据", res);
  daoData.value = res.data.message;
});

import {floorApi} from '@/api/api'
let floorData=ref([])
floorApi().then((res)=>{
    console.log('楼层数据',res)
    floorData.value=res.data.message
})
</script>

<style lang="scss" scoped></style>
